<template>
  <div>
    <h1>父组件</h1>
    <div>{{ count }}</div>
    <div><button @click="count++">+</button></div>
    <hr />
    <child></child>
  </div>
</template>

<script>
import Child from "./Child.vue";
export default {
  data() {
    return {
      count: 1,
    };
  },
  components: {
    Child,
  },
  beforeCreate() {
    console.log("父、beforeCreate");
  },
  created() {
    console.log("父、created");
  },
  beforeMount() {
    console.log("父、beforeMount");
  },
  mounted() {
    console.log("父、mounted");
  },
  beforeUpdate() {
    console.log("父、beforeUpdate");
  },
  updated() {
    console.log("父、update");
  },
  beforeDestroy() {
    console.log("父、beforeDestroy");
  },
  destroyed() {
    console.log("父、destroyed");
  },
};
</script>

<style>
</style>